package com.lingz.manager.modules.wuxue.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingz.manager.modules.wuxue.entity.WaterConservancyData;
import com.lingz.manager.modules.wuxue.mapper.WaterConservancyDataMapper;
import com.lingz.manager.modules.wuxue.service.WaterConservancyDataService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (WaterConservancyData)表服务实现类
 *
 * @author makejava
 * @since 2023-12-08 14:40:59
 */
@Service("waterConservancyDataService")
public class WaterConservancyDataServiceImpl extends ServiceImpl<WaterConservancyDataMapper, WaterConservancyData> implements WaterConservancyDataService {

    @Override
    public List<WaterConservancyData> findWaterConservancyDataList() {
        LambdaQueryWrapper<WaterConservancyData> wrapper = new LambdaQueryWrapper<>();
        wrapper.orderByAsc(WaterConservancyData::getTm);
        return baseMapper.selectList(wrapper);
    }

    @Override
    public List<WaterConservancyData> findLatestDataById(String id) {
        return baseMapper.getLatestDataById(id);
    }
}

